import request from "./request.js"

export const Login = (form) => {
    return request({
        url: `/api/users/login?username=${form.username}&password=${form.password}`,
        method: 'POST',
    })
}
export const Register = (form) => {
    return request({
        url: '/api/users/register',
        method: 'POST',
        data:{
            username: form.username,
            password:form.password,
            name:form.name,
            gender:form.gender,
            age:form.age
        },
        headers: {
            'Content-Type': 'application/json'
          },
    })
}
